const httpFormInstance = axios.create({
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
  }
});
const httpJsonInstance = axios.create({});
export const getFinishList = (url, params, cancelToken) => {
  return httpFormInstance.post(
    _ctxPath + url,
    params,
    {cancelToken: cancelToken.token ? cancelToken.token : null}
  );
};
export const getMetaData = (params) => {
  return httpJsonInstance.post(
    `${_ctxPath}/rest/global/metadata/list`,
    params
  );
};
export const deleteTraceWorkflows = (params) => {
  return httpFormInstance.post(
    _ctxPath + '/ajax.do?method=ajaxAction&managerName=traceWorkflowManager',
    params,
  );
};
export const onBeforeValidate4TakeBack = (params) => {
  return httpFormInstance.post(
    _ctxPath + '/ajax.do?method=ajaxAction&managerName=WFAjax',
    params,
  );
};
export const executeBeforeEvent = (params) => {
  return httpFormInstance.post(
    _ctxPath + '/ajax.do?method=ajaxAction&managerName=WFAjax',
    params,
  );
};
export const releaseWorkflow = (params) => {
  return httpFormInstance.post(
    _ctxPath + '/ajax.do?method=ajaxAction&managerName=WFAjax',
    params,
  );
}
export const getValidateInformData = (params) => {
  return httpJsonInstance.post(
    `${_ctxPath}/rest/doneInform/validate/affair`,
    params
  );
};
export const getDoneInformData = (params) => {
  return httpJsonInstance.post(
    `${_ctxPath}/rest/doneInform/toInform`,
    params
  );
};
